<div class="todo-dialog" ng-show="visible">
  <div class="todo-dialog-mask">
    <div ng-transclude></div>
    <p class="todo-dialog-footer">
      <button ng-click="confirm()">确认</button>
      <button ng-click="cancel()">取消</button>
    </p>
  </div>
</div>
<style>
.todo-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.5);
}
.todo-dialog-mask {
  position: absolute;
  margin: auto;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 1rem 2rem;
}
.todo-dialog-footer {
  text-align: center;
}
</style>